package com.alili.springbooteditor.service;

import com.alili.springbooteditor.dao.PersonDao;
import com.alili.springbooteditor.entities.Persons;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LoginService {
    @Autowired
    PersonDao personDao;
    //判断登录条件
    public boolean checkLogin(Persons persons){
        List<Persons> list = personDao.getUser(persons.getUsername(), persons.getPassword());
        return list.size()>0;
    }
}
